import { FC, ReactElement } from 'react'
import ExpertEvaluation from '../../../evaluation/components/expert-evaluation'
import OfficeEvaluation from '../../../evaluation/components/office-evaluation'
import ScaleEvaluation from '../../../evaluation/components/scale-evaluation'
import { Location } from 'history-with-query'
import styles from './index.less'
interface IProps {
  location: Location
}
const AssignmentPage: FC<IProps> = ({ location }): ReactElement => {
  const { type } = location.query as { type: string }

  return (
    <>
      <div className={styles.container}>
        {type === '03' ? (
          <ExpertEvaluation location={location} />
        ) : type === '02' ? (
          <OfficeEvaluation location={location} />
        ) : (
          <ScaleEvaluation location={location} />
        )}
      </div>
    </>
  )
}

export default AssignmentPage
